package org.testmyapp.listeners;

import java.util.ArrayList;
import java.util.List;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.inject.Named;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.ExecutionListener;
import org.testmyapp.persistence.BusinessObjectPersistenceProvider;
import org.testmyapp.session.SessionForUser;

import demoUI.DemoObjectA;
import demoUI.DemoObjectB;

@Named(value="initMe")
@ApplicationScoped
public class StartContext implements ExecutionListener {
	
	@Inject
	private SessionForUser session;
	
	@Inject
	private BusinessObjectPersistenceProvider bopp;

	public void notify(DelegateExecution execution) throws Exception {
		List<DemoObjectA> listA = new ArrayList<DemoObjectA>();
		List<DemoObjectB> listB = new ArrayList<DemoObjectB>();
		execution.setVariable("demoObjectAList", listA);
		execution.setVariable("demoObjectBList", listB);
	}

}
